package com.zack.shop.mvp.contract;

import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;
import com.zack.shop.mvp.http.entity.BaseResponse;
import com.zack.shop.mvp.http.entity.login.JWTBean;
import com.zack.shop.mvp.http.entity.login.UserBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;

/**
 * @Author 张迁-zhangqian
 * @Data 2018/5/30 下午5:21
 * @Package com.zack.shop.mvp.contract
 **/
public interface LoginContract {

    interface View extends IView {
        void loginResult(JWTBean msg);

        void registerSuccess(UserBean userBeanBaseResponse);
    }

    interface Model extends IModel {
        Observable<BaseResponse> loginByUsernamePassword(RequestBody info);

        Observable<BaseResponse> loginByToken(RequestBody info);

        Observable<BaseResponse> sendSms(RequestBody info);

        Observable<BaseResponse> updatePwd(RequestBody info);

        Observable<BaseResponse> forgetPwd(RequestBody info);

        Observable<BaseResponse> register(RequestBody info);
    }
}
